package cn.livingCloud.dto;

import cn.livingCloud.context.Config;
import cn.livingCloud.entity.system.ImageResource;

import java.util.List;

/**
 * Created by 唐旭 on 2016/2/15.
 */
public class ImageManageListDto extends Page<ImageItemDto> {
    private String name;
    private boolean archive = false;
    private String extName;
    private String startTime;
    private String endTime;

    public ImageManageListDto() {
        super();
        super.rowSize = 12;
    }

    @Override
    public void addAllList(List itemList) {
        for (Object o : itemList) {
            ImageResource resource = (ImageResource) o;
            list.add(new ImageItemDto(resource));
        }
    }

    public String getName() {
        return name;
    }

    public ImageManageListDto setName(String name) {
        this.name = name;
        return this;
    }

    public boolean isArchive() {
        return archive;
    }

    public ImageManageListDto setArchive(boolean archive) {
        this.archive = archive;
        return this;
    }

    public String getExtName() {
        return extName;
    }

    public ImageManageListDto setExtName(String extName) {
        this.extName = extName;
        return this;
    }

    public String[] getAllExtName() {
        return Config.getAllowImageExtension();
    }

    public String getEndTime() {
        return endTime;
    }

    public ImageManageListDto setEndTime(String endTime) {
        this.endTime = endTime;
        return this;
    }

    public String getStartTime() {
        return startTime;
    }

    public ImageManageListDto setStartTime(String startTime) {
        this.startTime = startTime;
        return this;
    }
}
